<!doctype html>
<html lang="en">
<head>
 @include('web.layout.head')
<link rel="stylesheet" href="{{mix('/css/web/shop/shop_header.css')}}">
<link rel="stylesheet" href="{{mix('/css/web/shop/shop.css')}}">
<title>店铺首页</title>

</head>
<body class="por shop_1" style="background: #fff;">
<div class="mask"></div>
<div class="prompt_box">
    <div class="closebox">
        <img src="{{asset('/img/web/deal/cancle.png')}}" alt="" width="16" height="14">
    </div>
    <div class="prompt_title">联系方式</div>
    <div class="prompt_content">
        <p>商家：<span>111</span></p>
        <p>联系电话：155988888</p>
        <p>您也可以使联系安防管家查找卖家，免费拨打400-016-6889</p>
    </div>
</div>
<div class="headerbox">
    <link rel="stylesheet" href="http://www.m.com/css/web/inc/header.css">
<script src="http://www.m.com/js/web/inc/main_header.js"></script>
<div class="base_header">
    <div class="w1200">
        <div class="header_fl fl">
            <ul>
                <li>

                    <a href="http://www.m.com/">e井首页</a>


                   <!--  <em></em> -->
                </li>
               <!--  <li>

                    <a href="http://www.m.com/product/brand">品牌</a>
                    <em></em>
                </li>
                <li>

                    <a href="http://www.m.com/warehouse/index">库品</a>
                    <em></em>
                </li>
                <li>

                    <a href="http://www.m.com/product/brand">管家</a>
                </li> -->
            </ul>
        </div>
        <div class="header_fl header_flr flr">
            <ul>
                                <li>
                    <a href="http://www.m.com/user/login">登录</a>
                </li>
                <li>
                    <a href="http://www.m.com/user/register">免费注册</a>
                </li>
                                <li>
                    <a href="http://www.m.com/member/buyer/orders">我的订单</a>
                </li>
                <li>
                    <a href="http://www.m.com/member/user/safe">我的e井</a>
                </li>

                <li>400-016-6889</li>
            </ul>
        </div>
    </div>
</div>
<div class="ff-serch">

    <div class="width1200 ">
        <div class="fl store_logobox">
            <a href="">

                <img id="shop_sp_logo" src="http://ejing-files-uploads.oss-cn-hangzhou.aliyuncs.com/upload/image/aehcyr06gob9dux7mqlt1522309905.jpg">
            </a>
            <div class="quality">
                <span>描述</span>
                <font class="red">4.9↓</font>
            </div>
            <div class="quality">
                <span>服务</span>
                <font class="red">4.9-</font>
            </div>
            <div class="quality">
                <span>物流</span>
                <font class="green">4.9↑</font>
            </div>
        </div>

        <div class="srch fl por">
            <div class="bh-zy ovh">


                <input type="text" id="kw" name="kw" class="d-kg fl" data-url="http://www.m.com/shop/products/1" value="" placeholder="商品名称" autocomplete="off">
                <a>
                    <input class="lbj fl product_search" type="submit" value="查找">
                </a>
            </div>
            <em class="poa"></em>
            <ul class="prompt"></ul>
        </div>

        <div class="shopping fr">

            <div class="bbbb" id="yc_gwcb">
                <a target="_blank" href="/member/buyer/carts" rel="nofollow">
                                        <img class="carticon" style="" src="http://www.m.com/img/web/inc/icon/index_sygwc.png">
                    <div class="buygoods" style=" ">进货单</div>
                    <span class="bugtotle  zongjinum" style="">
                                            </span>
                </a>
            </div>

            <div class="yl_gwc dddd yl_gwczj1" style="border-top: none; display: none;">
                <div class="cart_list_cookie">
                    <div class="yl_gwczj">最近加入的商品</div>
                    <div class="yl_sp">
                        <ul>
                                                    </ul>
                    </div>

                    <div class="yl_gbottom">
                        <div class="yl_gnumz">共 <i class="pro_num">0</i> 件商品</div>
                        <div class="yl_gnumz1" style="width: 110px;"> 共计 ¥<i class="pro_total">0.00</i></div>
                        <div class="yl_gnumz2" style="width: 90px;"><a href="/member/buyer/carts" target="_blank">查看进货单</a></div>
                    </div>
                </div>
            </div>
        </div>

        <div class="clear"></div>
    </div>
</div>

<script>

    $(function () {

        $(".product_search").on('click', function (event) {
            event.preventDefault();
            /* Act on the event */
            var product_name = $("#kw").val();
            var parten = /^[A-Za-z0-9\u4e00-\u9fa5]+$/;

            if (!parten.exec(product_name)) {
                product_name = false;
                $("#kw").val('');
                layer.alert("请输入正确的商品名称!", {icon: 0});
            } else {
                if (!product_name) {
                    layer.alert("请输入要搜索的内容!", {icon: 0});
                    product_name = $("#kw").attr('placeholder');
                } else {
                    location.href = '/shop/products/1?name=' + product_name;
                }
            }
            // console.log();
        });
        $(".key_name").on('click', function (event) {
            event.preventDefault();
            /* Act on the event */
            var product_name = $(this).text();
            location.href = '/product/search?product_name=' + product_name;
        });
//        $("#kw").bind('input propertychange', function(){
//            console.log($(this).val());
//        });

    });
</script>


<script type="text/javascript">
    var carts_delete_url = '/member/buyer/carts/0';

    $(function () {
        $(".bbbb").hover(function () {
            $(".cccc ").show();
            $(".dcdd ").show();
            // $(".yl_gwc ").addClass("value1");
        });

        $(".shopping").mouseover(function () {
            $(".cccc").show();
            $(".dddd ").show();
        });
        $(".shopping").mouseout(function () {
            $(".cccc").hide();
            $(".dddd ").hide();
        });
    })


    $('.yl_sp ul').delegate('.delete', 'click', function () {
        var cart_id = $(this).data('id');
        var sku_id = $(this).data('sku-id');
        layer.confirm('是否删除', {
            btn: ['确认', '取消'] //可以无限个按钮
        }, function (index) {
            $.ajax({
                url: carts_delete_url,
                type: 'DELETE',
                dataType: 'json',
                data: {'type': 'batch','cart_ids': [cart_id], 'sku_ids':[sku_id]},
                success: function (data) {
                    if (0 == data.code) {
                        layer.alert(data.message, {
                            icon: 1
                        }, function () {
                            location.reload();
                        });
                    } else {
                        layer.alert(data.message, {
                            icon: 1
                        });
                    }
                }
            });
        }, function (index, layero) {
            layer.close(index);
        });
    });
</script>
    @include('web.shop.top_nav')
    {{--<div class="company_option shop_bg1">--}}
        {{--<div class="w1200">--}}
            {{--<ul>--}}
                {{--<a href="/shop/index/1"><li data-type="supply_index">首页</li></a>--}}
                {{--<a href="/shop/products/1"><li data-type="supply_glists">供应产品</li></a>--}}
                {{--<a href="/shop/service/1"><li data-type="" class="active">服务</li></a>--}}
                {{--<a href="/shop/archives/1"><li data-type="archives">公司档案</li></a>--}}
            {{--</ul>--}}
            {{--<div class="on_collection collection_shop">收藏店铺</div>--}}
        {{--</div>--}}
    {{--</div>--}}
</div>
<div class="company_tab_box">
    <div class="swiper-container banner swiper-container-horizontal" style="height: 416.281px; overflow: hidden;">
        <div class="swiper-wrapper" style="transform: translate3d(0px, 0px, 0px);">
                            <div class="swiper-slide swiper-slide-active" style="width: 1903px;"><img src="http://www.m.com/img/web/deal/banner/banner1.jpg" alt=""></div>
                    </div>
        <div class="swiper-pagination swiper-pagination-clickable swiper-pagination-bullets"><span class="swiper-pagination-bullet swiper-pagination-bullet-active"></span></div>
    </div>

    <div class="company_tab" id="supply_index" style="display: block;">
        <div class="company_bigbox">
            <div class="w1200">
                <div class="bigbox_left">
                    <div class="infobox">
                        <div class="titlebox shop_bg1">
                            <div class="tit">1111</div>
                        </div>
                        <div class="title_bot">
                            <div class="bot_top">
                                <div class="top_left fl">联系人：</div>
                                <div class="top_right fl"><span>黄健健</span></div>
                            </div>
                            <div class="bot_top">
                                <div class="top_left fl">经营模式：</div>
                                <div class="top_right fl"><span>生产厂家</span></div>
                            </div>
                            <div class="bot_top">
                                <div class="top_left fl">店铺等级：</div>
                                <div class="top_right fl"><span></span></div>
                            </div>
                            <div class="bot_top">
                                <div class="top_left fl">店铺标识：</div>
                                <div class="top_right fl"></div>
                            </div>
                            <div class="bot_top" style="height: auto;display: inline-block;">
                                <div class="top_left fl">联系商家：</div>
                                <div class="top_right fl" style="width: 128px;">
                                    <span>
                                        <a href="javascript:void(0);" id="contact" data-id="">
                                            点击联系<img src="{{asset('img/contactus.gif')}}">
                                        </a>
                                    </span>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="typebox">
                        <div class="titlebox shop_bg1"><div class="tit">产品分类</div></div>
                        <div class="title_bot">
                            <ul>
                                                                                                            <li>
                                            <div class="border_l_b border_l_b_1"></div>
                                            <div class="type fl"><a href="http://www.m.com/shop/products/1?custom_cate=12" title="绕弯儿无111">绕弯儿无111</a></div>
                                        </li>

                            </ul>
                        </div>
                    </div>
                    <div class="cetifivatebox">
                        <div class="titlebox shop_bg1"><div class="tit">企业证书</div></div>
                        <div class="title_bot">
                            <ul>
                                                                <li>
                                    <div class="imgbox">
                                        <img src="http://ejing-files-uploads.oss-cn-hangzhou.aliyuncs.com/upload/image/atqfoklsbuy7ej8xwd341522396166.jpg" alt="" layer-index="0">
                                    </div>
                                    <a>点击查看</a>
                                </li>

                                <li>
                                    <div class="imgbox">
                                        <img src="http://ejing-files-uploads.oss-cn-hangzhou.aliyuncs.com/upload/image/yn84eodtfmqw236u0c9j1522396167.jpg" alt="" layer-index="1">
                                    </div>
                                    <a>点击查看</a>
                                </li>

                                <li>
                                    <div class="imgbox">
                                        <img src="http://ejing-files-uploads.oss-cn-hangzhou.aliyuncs.com/upload/image/7uk1cviqg0pb8tfs4h5d1522396170.jpg" alt="" layer-index="2">
                                    </div>
                                    <a>点击查看</a>
                                </li>
                                                            </ul>
                        </div>
                    </div>
                </div>
                <div class="bigbox_right">
                    <div class="h2_top_tit">
                        <span>首页＞服务＞资质服务</span>
                    </div>
                    <div class="service_list">
                        <table>
                            <thead>
                            <tr>
                                <th>
                                    <label class="checkbox-inline"><input type="checkbox" class="checkboxall" name="" value="1"/><font>全选</font></label>
                                </th>
                                <th>资质名称</th>
                                <th width="200">级别</th>
                                <th width="200">费用</th>
                                <th width="200">成交量</th>
                            </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td>
                                        <label class="checkbox-inline"><input type="checkbox" class="checkbox" name="menu[]" value="1"/></label>
                                    </td>
                                    <td>
                                        <img width="150" src="{{asset('img/web/product/video1.jpg')}}">
                                        <p>信息安全资质</p>
                                    </td>
                                    <td>甲级</td>
                                    <td>
                                        <span>盖章费：3000元</span>
                                        <span>管理费：3%</span>
                                    </td>
                                    <td>3单</td>
                                </tr>
                                <tr>
                                    <td>
                                        <label class="checkbox-inline"><input type="checkbox" class="checkbox" name="menu[]" value="2"/></label>
                                    </td>
                                    <td>
                                        <img width="150" src="{{asset('img/web/product/video1.jpg')}}">
                                        <p>信息安全资质</p>
                                    </td>
                                    <td>甲级</td>
                                    <td>
                                        <span>盖章费：3000元</span>
                                        <span>管理费：3%</span>
                                    </td>
                                    <td>3单</td>
                                </tr>
                                <tr>
                                    <td>
                                        <label class="checkbox-inline"><input type="checkbox" class="checkbox" name="menu[]" value="3"/></label>
                                    </td>
                                    <td>
                                        <img width="150" src="{{asset('img/web/product/video1.jpg')}}">
                                        <p>信息安全资质</p>
                                    </td>
                                    <td>甲级</td>
                                    <td>
                                        <span>盖章费：3000元</span>
                                        <span>管理费：3%</span>
                                    </td>
                                    <td>3单</td>
                                </tr>
                            </tbody>
                        </table>
                        <div class="buy_btn fr" data-shopid="1">立即购买</div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
 @include('web.layout.footer_ware1')
</body>
</html>
<script>
    window.onload=function(){
        divWidth();
    }
    //当浏览器窗口大小改变时，设置显示内容的高度
    window.onresize=function(){
        divWidth();
    }
    function divWidth(){
        var w = document.documentElement.clientWidth;//获取页面可见高度
        $('.banner').css({'height':w*(420/1920),'overflow':'hidden'});
    }

    $(function () {

        var jud = '{{ Session::get("user_id")}}';

        var mySwiper = new Swiper('.swiper-container', {
          autoplay: {
            delay: 3000,//1秒切换一次
          },
          pagination :{
            el: '.swiper-pagination',
            clickable :true,
          }
        });
        //input获得失去焦点效果
        $('input[type="text"]').focus(function () {
            $(this).addClass("active");
        })
        $('input[type="text"]').blur(function () {
            $(this).removeClass("active");
        })
        $('.searchbox li').click(function () {
            $(this).addClass('active').siblings().removeClass('active');
        })

        //联系方式弹框
        $('.intobox').click(function () {
            $('.mask').show();
            $('.prompt_box').show();
        })
        $('.prompt_box .closebox').click(function () {
            $('.prompt_box').hide();
            $('.mask').hide();
        })

        //企业证书放大效果
        layer.photos({
            photos: '.cetifivatebox'
            // ,area: '840px'
            ,anim: 0 //0-6的选择，指定弹出图片动画类型，默认随机（请注意，3.0之前的版本用shift参数）
        });


        $('.category .more').click(function () {
            $(this).hide();
            $('.category').css('height','auto');
        });
        $('.brand .more').click(function () {
            $(this).hide();
            $('.brand').css('height','auto');
        });

        //收藏店铺
        $(".collection_shop").click(function () {
            if (jud == '' || jud == '0') {
                layer.confirm('请先登录后再关注店铺，点击【确认】跳转到登录页面', {
                    title: '温馨提示',
                    btn: ['确认', '取消'] //可以无限个按钮
                }, function (index) {
                    window.location.href = AJAX_URL + '/user/login';
                }, function (index) {
                    layer.close(index);
                });
                return false;

            } else {
                var shop_id = '';
//                    var pid = 9378;
                var token = '{{csrf_token()}}';
                $.ajax({
                    url: '/product/collection',
                    type: 'GET',
                    dataType: 'json',
                    data: { _token: token,type:'shop','shop_id':shop_id},
                    success: function (data) {
                        if (data.code == 0) {
                            $('.collection_shop').html('已收藏店铺');
                            layer.alert('店铺收藏成功');
                        }else{
                            layer.alert('店铺收藏失败');
                        }
                    }

                })
            }

        });
        // 联系商家
//        $("#contact").click(function (e) {
//
//            if (jud == '' || jud == '0') {
//                layer.confirm('请先登录后再联系卖家', {
//                    title: '温馨提示',
//                    btn: ['确认', '取消'] //可以无限个按钮
//                }, function (index) {
//                    window.location.href = AJAX_URL + '/user/login';
//                }, function (index) {
//                    layer.close(index);
//                });
//                return false;
//
//            } else {
//                //注意：店铺id字段被改了
//                //var url = 'http://im.91homedo.com/im/login.php?from=' + jud + '&to=shop['sp_id']';
//                window.open(url,'','width=1000,height=800');
//            }
//        });
    })

    //服务
    $(function () {

        //全选
        $('.checkboxall').on('click', function(event){
            var _this = this;
            if($(_this).is(':checked')){
                $(".service_list tbody input[type = 'checkbox']").each(function(){
                    $(this).prop("checked","checked");
                })
            }else{
                $(".service_list tbody input[type = 'checkbox']").each(function(){
                    $(this).prop("checked","");
                })
            }
        })
        //单选
        $(".service_list tbody input[type = 'checkbox']").on('click', function(event){
            if($(".service_list tbody input[type = 'checkbox']").length == $(".service_list tbody input[type = 'checkbox']:checked").length){
                $('.checkboxall').prop("checked","checked");
            }else{
                $('.checkboxall').prop("checked","");
            }
        })
        var ids = [];
        //立即购买
        $(".buy_btn").on('click', function(event){
            if($(".service_list tbody input[type = 'checkbox']:checked").length > 0){
                $(".service_list tbody input[type = 'checkbox']:checked").each(function(){
                    ids.push($(this).val());
                })
                $.ajax({
                    url:"",
                    type: "post",
                    data: {ids:ids,shop_id:1},
                    dataType:'json',
                    success:function(data){
                        if(0==data.code){
                            location.href='/member/seller/shop_brand';
                        }else{
                            layer.alert(data.message,{icon: 0});
                        }
                    }
                });
            }else{
                layer.alert('请选择购买的资质', {
                    title:'提示',
                    icon: 0
                });
            }
        })
    })
</script>